3.1822 \(\int \frac{\left (a+\frac{b}{x^2}\right )^2}{x} \, dx\)

Optimal. Leaf size=24 \[ a^2 \log (x)-\frac{a b}{x^2}-\frac{b^2}{4 x^4} \]

[Out]

-b^2/(4*x^4) - (a*b)/x^2 + a^2*Log[x]

_______________________________________________________________________________________

Rubi [A]  time = 0.0498924, antiderivative size = 24, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.231 \[ a^2 \log (x)-\frac{a b}{x^2}-\frac{b^2}{4 x^4} \]

Antiderivative was successfully verified.

[In]  Int[(a + b/x^2)^2/x,x]

[Out]

-b^2/(4*x^4) - (a*b)/x^2 + a^2*Log[x]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 8.15532, size = 24, normalized size = 1. \[ \frac{a^{2} \log{\left (x^{2} \right )}}{2} - \frac{a b}{x^{2}} - \frac{b^{2}}{4 x^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((a+b/x**2)**2/x,x)

[Out]

a**2*log(x**2)/2 - a*b/x**2 - b**2/(4*x**4)

_______________________________________________________________________________________

Mathematica [A]  time = 0.00146136, size = 24, normalized size = 1. \[ a^2 \log (x)-\frac{a b}{x^2}-\frac{b^2}{4 x^4} \]

Antiderivative was successfully verified.

[In]  Integrate[(a + b/x^2)^2/x,x]

[Out]

-b^2/(4*x^4) - (a*b)/x^2 + a^2*Log[x]

_______________________________________________________________________________________

Maple [A]  time = 0.009, size = 23, normalized size = 1. \[ -{\frac{{b}^{2}}{4\,{x}^{4}}}-{\frac{ab}{{x}^{2}}}+{a}^{2}\ln \left ( x \right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((a+b/x^2)^2/x,x)

[Out]

-1/4*b^2/x^4-a*b/x^2+a^2*ln(x)

_______________________________________________________________________________________

Maxima [A]  time = 1.43841, size = 35, normalized size = 1.46 \[ \frac{1}{2} \, a^{2} \log \left (x^{2}\right ) - \frac{4 \, a b x^{2} + b^{2}}{4 \, x^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a + b/x^2)^2/x,x, algorithm="maxima")

[Out]

1/2*a^2*log(x^2) - 1/4*(4*a*b*x^2 + b^2)/x^4

_______________________________________________________________________________________

Fricas [A]  time = 0.228801, size = 38, normalized size = 1.58 \[ \frac{4 \, a^{2} x^{4} \log \left (x\right ) - 4 \, a b x^{2} - b^{2}}{4 \, x^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a + b/x^2)^2/x,x, algorithm="fricas")

[Out]

1/4*(4*a^2*x^4*log(x) - 4*a*b*x^2 - b^2)/x^4

_______________________________________________________________________________________

Sympy [A]  time = 1.28235, size = 22, normalized size = 0.92 \[ a^{2} \log{\left (x \right )} - \frac{4 a b x^{2} + b^{2}}{4 x^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a+b/x**2)**2/x,x)

[Out]

a**2*log(x) - (4*a*b*x**2 + b**2)/(4*x**4)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.234907, size = 46, normalized size = 1.92 \[ \frac{1}{2} \, a^{2}{\rm ln}\left (x^{2}\right ) - \frac{3 \, a^{2} x^{4} + 4 \, a b x^{2} + b^{2}}{4 \, x^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a + b/x^2)^2/x,x, algorithm="giac")

[Out]

1/2*a^2*ln(x^2) - 1/4*(3*a^2*x^4 + 4*a*b*x^2 + b^2)/x^4